/**
 * 枚举和Option
 */
pub fn get_distance(distance: i32) -> Option<i32> {
    if distance > 18 {
        Some(true);
    } else {
        None;
    }
}

pub fn run() {
    let a = match get_distance(1800) {
        Some(true) => 1,
        None => 0,
    };
    println!("a={}", a);
}